

#ifndef __WAIT_DIALOG_H__
#define __WAIT_DIALOG_H__
#include "mzwndex.h"
#include "mzfc_ui.h"

#define  CLOSE_WAITING_WINDOW              WM_USER + 160
class WaitDialog : public CMzWndEx
{
	MZ_DECLARE_DYNAMIC(WaitDialog);
public:
	WaitDialog();
	void EnableDrawGridDlgBG(BOOL bEnable=TRUE);
	virtual ~WaitDialog();
	virtual void PaintWin(HDC hdc, RECT* prcUpdate /* = NULL */);
	virtual LRESULT MzDefWndProc(UINT message, WPARAM wParam, LPARAM lParam);
	void SetBgTrans( BOOL bBgTrans )
	{
		m_bBgTrans = bBgTrans;
	}
protected:
	virtual BOOL OnInitDialog();
	virtual void OnTimer(UINT_PTR nIDEvent);

#define WAIT_PIC_NUM	12
	ImagingHelper m_waitPic[WAIT_PIC_NUM];

	int m_count;
	HDC m_hDcBG;
	HBITMAP m_hbmp;
	HGDIOBJ m_hOldBmp;
	BOOL	m_bDrawGridDlgBG;
	BOOL m_bBgTrans;
};
struct WaitThread 
{
	WaitDialog *pWaitDlg;
	DWORD waitThreadID;
	HWND parentHWnd;
};

#endif
